<template>
    <view :style="themeColor">
        <view class="page" >
    <view class="flex benben-position-layout flex flex-wrap align-center evaluate_flex_0"    :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
            <view   class='flex flex-wrap align-center justify-between flex-sub evaluate_fd0_0'      >
            <view   class='flex flex-wrap align-center evaluate_fd0_0_c0'   @tap.stop="handleJumpDiy" data-type="back" data-url="1"   >
        <text class='fu-iconfont2  evaluate_fd0_0_c0_c0'    >&#xE794;</text>
</view>
    <view   class='flex flex-wrap align-stretch justify-center'      >
        <text class='evaluate_fd0_0_c1_c0'  >评价</text>
</view>
    <view   class='flex flex-wrap align-center justify-end evaluate_fd0_0_c0'      >
        </view>
</view>

        </view>
<view :style="{height: (88+StatusBarRpx)+'rpx'}"  ></view>
<!---flex布局flex布局开始-->
 <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout"    >
            <view   class='flex flex-direction flex-wrap align-stretch evaluate_fd1_0'      >
            <view   class='flex flex-wrap align-center evaluate_fd1_0_c0'      >
        <text class='evaluate_fd1_0_c0_c0'  >农具评价</text>
<view class='flex flex-wrap align-center'  >
    <template v-for="starNum in [1,2,3,4,5]">
        <image @click="service_star = starNum" v-if="service_star >= starNum" :key="starNum" class='evaluate_star1fd1_0_c0_c1'  mode="aspectFit"  :src='STATIC_URL+"68.png"'></image>
        <image @click="service_star = starNum" v-else :key="starNum"  class='evaluate_star1fd1_0_c0_c1'  mode="aspectFit"  :src='STATIC_URL+"67.png"'></image>
    </template>
</view>
</view>
    <view   class='flex flex-wrap align-center'      >
        <text class='evaluate_fd1_0_c0_c0'  >服务评价</text>
<view class='flex flex-wrap align-center'  >
    <template v-for="starNum in [1,2,3,4,5]">
        <image @click="start = starNum" v-if="start >= starNum" :key="starNum" class='evaluate_star1fd1_0_c1_c1'  mode="aspectFit"  :src='STATIC_URL+"68.png"'></image>
        <image @click="start = starNum" v-else :key="starNum"  class='evaluate_star1fd1_0_c0_c1'  mode="aspectFit"  :src='STATIC_URL+"67.png"'></image>
    </template>
</view>
</view>
<view class='flex flex-wrap evaluate_fd1_0_c2'>
<textarea class='flex evaluate_input_fd1_0_c2'  :placeholder="'请输入您的评价内容'" :maxlength="240" placeholder-style="color:#999;font-size:28rpx"   v-model="content" />

</view>
</view>
</view>
        
<!---flex布局flex布局结束-->
    <view class="flex flex-wrap align-stretch justify-center benben-position-layout flex evaluate_flex_2"    >
        <button class='evaluate_fd2_0'  @tap.stop="orderEvaluateFunc()"  >提交</button>

        </view>
<view :style="{height: '120rpx'}"  ></view>
    
    
        </view>
    </view>
</template>
<script>
    import {validate} from '@/common/utils/validate.js'
    export default {
        components:{},
        
        
        data(){
			return {"start":0,"content":"","service_star":0,"goods_id":"","order_sn":"","sku_id":""};
		},
		computed:{
            themeColor() {
              return this.$store.getters.themeColor
            },
            
		},
		watch:{},
		onLoad(options){
            let {goods_id,order_sn,sku_id}=options
if (goods_id !== undefined) this.goods_id = goods_id
if (order_sn !== undefined) this.order_sn = order_sn
if (sku_id !== undefined) this.sku_id = sku_id
		},
        onUnload() {
                
        },
		onReady(){
            
		},
		onShow(){
            
		},
		onHide(){
            
		},
		onResize(){
            
		},
		onPullDownRefresh(){
            
		},
		onReachBottom(e){
            
		},
		onPageScroll(e){
            
		},
		methods:{
                            //订单评价
                async orderEvaluateFunc(){
                        //请求方法
    //数据验证
    
  let data62d236aca4ef6 = await this.$api.get(global.apiUrls.post62d236aca4ef6, {
    order_sn:this.order_sn,goods_id:this.goods_id,sku_id:this.sku_id,star:this.start,content:this.content,service_star:this.service_star
  });
  
  if (data62d236aca4ef6.data.code != 1) {
    this.$message.info(data62d236aca4ef6.data.msg);
    return
  } 
  
  
                    this.$message.info('评价成功');
                setTimeout(()=>{
                    this.$urouter.navigateBack(1);
      },800)
                }
		}
    };
</script> 
<style lang="scss" scoped>
           .page{
            width: 100vw;
            overflow-x: hidden;
            min-height: calc(100vh - var(--window-bottom));
            background:url(https://api.nongjugongxiang.com/nongju/images/1.png) no-repeat;background-size: 100% auto;
        }
    .evaluate_flex_0{
        background:url(https://api.nongjugongxiang.com/nongju/images/1.png) no-repeat;width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
    }
    .evaluate_fd0_0_c1_c0{
        font-size:36rpx;font-weight:400;color:var(--benbenFontColor3);line-height:88rpx;
    }
    .evaluate_fd0_0_c0_c0{
        font-size:36rpx;color:var(--benbenFontColor3);
    }
    .evaluate_fd0_0_c0{
        width:120rpx;
    }
    .evaluate_fd0_0{
        padding:0rpx 32rpx 0rpx 32rpx;
    }
    .evaluate_input_fd1_0_c2{
        width:100%;height:140rpx;font-size:28rpx;font-weight:400;color:#333;white-space:pre-wrap;
    }
    .evaluate_fd1_0_c2{
        background:rgba(248, 248, 248, 1);width:650rpx;border-radius:10rpx 10rpx 10rpx 10rpx;padding:24rpx 24rpx 0rpx 24rpx;margin:32rpx 0rpx 0rpx 0rpx;height:400rpx;
    }
    .evaluate_star1fd1_0_c1_c1{
        width:40rpx;height:40rpx;margin:0rpx 4rpx 0rpx 5rpx;
    }
    .evaluate_star1fd1_0_c0_c1{
        height:40rpx;margin:0rpx 4rpx 0rpx 5rpx;width:40rpx;
    }
    .evaluate_star1fd1_0_c0_c1{
        width:40rpx;height:40rpx;margin:0rpx 4rpx 0rpx 5rpx;
    }
    .evaluate_fd1_0_c0_c0{
        color:#333333;font-size:28rpx;font-weight:400;margin:0rpx 24rpx 0rpx 0rpx;
    }
    .evaluate_fd1_0_c0{
        margin:0rpx 0rpx 32rpx 0rpx;
    }
    .evaluate_fd1_0{
        background:#FFFFFF;border-radius:16rpx 16rpx 16rpx 16rpx;padding:32rpx 24rpx 32rpx 24rpx;margin:34rpx 24rpx 0rpx 24rpx;
    }
    .evaluate_flex_2{
        background:var(--benbenbgColor0);width:750rpx;height:120rpx;overflow:hidden;z-index:10;bottom:calc(0rpx + var(--window-bottom));background-size:100% auto;
    }
    .evaluate_fd2_0{
        background:#E63838;border-radius:44rpx 44rpx 44rpx 44rpx;width:702rpx;line-height:88rpx;font-size:32rpx;color:#fff;height:88rpx;
    }
</style>